package com.Khan.SocialRescueSys.service.impl;

import com.Khan.SocialRescueSys.dao.UserDao;
import com.Khan.SocialRescueSys.pojo.User;
import com.Khan.SocialRescueSys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Khan Liu
 * @date 2022/4/5 20:34
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public User checkUser(String username, String password) {
        return userDao.queryByUsernameAndPassword(username,password);
    }

    @Override
    public User queryByUsername(String username) {
        return userDao.queryByUsername(username);
    }
}
